#类的
# class Mokkaya:
#     name=None
#     age=None
#     def __init__(self,name,age=None):
#         self.name=name;
#         self.age=age;
#     def order(self):
#         print(f"我是{self.name},年龄{self.age}")
#     def __str__(self):
#         return f"我是{self.name},年龄{self.age}"
#     def __del__(self):
#         print("我被删除le")
# dm=Mokkaya("jianye")
# print(dm)
class Student():
    __name=None
    __age=None

    def __init__(self):
        pass
    def setage(self,age):
       try:
           if int(age) < 16 :
               self.age=age
       except:
          print("请输入数字")
    def getage(self):
        print(f"年龄是{self.age}")
        return self.age

stu=Student()
stu.setage("5")
print(stu.getage())
#继承
class Fu():
    money=1000
    def __init__(self):
        print("父类初始化")
    def order(self):
        print("我要买鞋",self.money)
class Zi(Fu):

    def order(self):
        super().order()
    pass
zi=Zi()
zi.order()

class Teacher(object):
    @classmethod
    def teach(cls):
        print("上课")
    @staticmethod
    def playWangZhe():
        print("稳住！我们能赢！")

Teacher().playWangZhe()
Teacher.teach()